package coollemon.view;
import javax.swing.*;
import java.awt.*;
public class MyList extends JScrollPane
{
	JList list;
	public MyList(String[] s,String name)
	{
		list = new JList(s);
		this.setViewportView(list);
		this.setBorder(BorderFactory.createTitledBorder(name));
	}
	public void setList(Object[] names)
	{
		list.setListData(names);
		this.setViewportView(list);
	}
}
